// index.js
import Mock from "mockjs";

export default function setupMock() {
  // 配置 Mock 接口
  Mock.mock("/api/files", "get", {
    code: 200,
    message: "success",
    data: [
      { id: 1, name: "文件1.txt", size: "10KB", status: "已审核", modified: "2024-12-27" },
      { id: 2, name: "文件2.doc", size: "20KB", status: "待审核", modified: "2024-12-26" },
    ],
  });

  Mock.mock("/api/folders", "post", {
    code: 200,
    message: "新建文件夹成功",
  });

  Mock.mock("/api/folders", "get", {
    code: 200,
    message: "success",
    data: [
      { id: 1, label: "文件夹1" },
      { id: 2, label: "文件夹2" },
    ],
  });
}
